<!--
 * @Descripttion : 
 * @Autor        : Lilong
 * @Date         : 2022-09-30 11:15:22
 * @LastEditTime : 2022-09-30 11:15:29
 * @FilePath     : \表单控件绑定\v-model和组件\第二种(用于自定义输入组件上)\改变默认的属性名称\不和计算属性一起使用\第二种方式：原生语法糖和defineComponent\APP.vue
-->
<script lang="ts">
    import { defineComponent, ref } from 'vue'
    import CustomInput from './CustomInput.vue'
    
    export default defineComponent({
      name:"APP",
      components: {
        CustomInput
      },
      setup(props, context) {
        const searchText2 = ref('')
    
        return {
          searchText2,
        }
      }
    })
</script>
      
<template>
    <custom-input
        :test="searchText2"
        @update:test="searchText2 = $event"
    ></custom-input>
    <div>{{ searchText2 }}</div>
</template>